<!DOCTYPE html>
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="description" content="刘清政">
  <meta name="keyword" content="hexo-theme">
  
    <link rel="shortcut icon" href="/css/images/logo.png">
  
  <title>
    
      python/路飞项目/1-项目基础/9-luffy前台主页 | Justin-刘清政的博客
    
  </title>
  <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow.min.css" rel="stylesheet">
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/css/plugins/gitment.css">

  
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
  
    
<script src="/js/qrious.js"></script>

  
  
    
<script src="/js/gitment.js"></script>

  
  

  
<meta name="generator" content="Hexo 4.2.0"></head>
<div class="wechat-share">
  <img src="/css/images/logo.png" />
</div>

  <body>
    <header class="header fixed-header">
  <div class="header-container">
    <a class="home-link" href="/">
      <div class="logo"></div>
      <span>Justin-刘清政的博客</span>
    </a>
    <ul class="right-list">
      
        <li class="list-item">
          
            <a href="/" class="item-link">主页</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/tags/" class="item-link">标签</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/archives/" class="item-link">归档</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/about/" class="item-link">关于我</a>
          
        </li>
      
    </ul>
    <div class="menu">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </div>
    <div class="menu-mask">
      <ul class="menu-list">
        
          <li class="menu-item">
            
              <a href="/" class="menu-link">主页</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/tags/" class="menu-link">标签</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/archives/" class="menu-link">归档</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/about/" class="menu-link">关于我</a>
            
          </li>
        
      </ul>
    </div>
  </div>
</header>

    <div id="article-banner">
  <h2>python/路飞项目/1-项目基础/9-luffy前台主页</h2>



  <p class="post-date">2020-02-27</p>
    <!-- 不蒜子统计 -->
    <span id="busuanzi_container_page_pv" style='display:none' class="">
        <i class="icon-smile icon"></i> 阅读数：<span id="busuanzi_value_page_pv"></span>次
    </span>
  <div class="arrow-down">
    <a href="javascript:;"></a>
  </div>
</div>
<main class="app-body flex-box">
  <!-- Article START -->
  <article class="post-article">
    <section class="markdown-content"><h2 id="前端主页"><a href="#前端主页" class="headerlink" title="前端主页"></a>前端主页</h2><h3 id="图片准备"><a href="#图片准备" class="headerlink" title="图片准备"></a>图片准备</h3><p>将提供的资料中的图片移植到项目的img文件夹下</p>
<h3 id="页头组件：components-Header-vue"><a href="#页头组件：components-Header-vue" class="headerlink" title="页头组件：components/Header.vue"></a>页头组件：components/Header.vue</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br></pre></td><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line">    &lt;div class&#x3D;&quot;header&quot;&gt;</span><br><span class="line">        &lt;div class&#x3D;&quot;slogan&quot;&gt;</span><br><span class="line">            &lt;p&gt;老男孩IT教育 | 帮助有志向的年轻人通过努力学习获得体面的工作和生活&lt;&#x2F;p&gt;</span><br><span class="line">        &lt;&#x2F;div&gt;</span><br><span class="line">        &lt;div class&#x3D;&quot;nav&quot;&gt;</span><br><span class="line">            &lt;ul class&#x3D;&quot;left-part&quot;&gt;</span><br><span class="line">                &lt;li class&#x3D;&quot;logo&quot;&gt;</span><br><span class="line">                    &lt;router-link to&#x3D;&quot;&#x2F;&quot;&gt;</span><br><span class="line">                        &lt;img src&#x3D;&quot;..&#x2F;assets&#x2F;img&#x2F;head-logo.svg&quot; alt&#x3D;&quot;&quot;&gt;</span><br><span class="line">                    &lt;&#x2F;router-link&gt;</span><br><span class="line">                &lt;&#x2F;li&gt;</span><br><span class="line">                &lt;li class&#x3D;&quot;ele&quot;&gt;</span><br><span class="line">                    &lt;span @click&#x3D;&quot;goPage(&#39;&#x2F;free-course&#39;)&quot; :class&#x3D;&quot;&#123;active: url_path &#x3D;&#x3D;&#x3D; &#39;&#x2F;free-course&#39;&#125;&quot;&gt;免费课&lt;&#x2F;span&gt;</span><br><span class="line">                &lt;&#x2F;li&gt;</span><br><span class="line">                &lt;li class&#x3D;&quot;ele&quot;&gt;</span><br><span class="line">                    &lt;span @click&#x3D;&quot;goPage(&#39;&#x2F;actual-course&#39;)&quot; :class&#x3D;&quot;&#123;active: url_path &#x3D;&#x3D;&#x3D; &#39;&#x2F;actual-course&#39;&#125;&quot;&gt;实战课&lt;&#x2F;span&gt;</span><br><span class="line">                &lt;&#x2F;li&gt;</span><br><span class="line">                &lt;li class&#x3D;&quot;ele&quot;&gt;</span><br><span class="line">                    &lt;span @click&#x3D;&quot;goPage(&#39;&#x2F;light-course&#39;)&quot; :class&#x3D;&quot;&#123;active: url_path &#x3D;&#x3D;&#x3D; &#39;&#x2F;light-course&#39;&#125;&quot;&gt;轻课&lt;&#x2F;span&gt;</span><br><span class="line">                &lt;&#x2F;li&gt;</span><br><span class="line">            &lt;&#x2F;ul&gt;</span><br><span class="line"></span><br><span class="line">            &lt;div class&#x3D;&quot;right-part&quot;&gt;</span><br><span class="line">                &lt;div&gt;</span><br><span class="line">                    &lt;span&gt;登录&lt;&#x2F;span&gt;</span><br><span class="line">                    &lt;span class&#x3D;&quot;line&quot;&gt;|&lt;&#x2F;span&gt;</span><br><span class="line">                    &lt;span&gt;注册&lt;&#x2F;span&gt;</span><br><span class="line">                &lt;&#x2F;div&gt;</span><br><span class="line">    		&lt;&#x2F;div&gt;</span><br><span class="line">        &lt;&#x2F;div&gt;</span><br><span class="line">    &lt;&#x2F;div&gt;</span><br><span class="line"></span><br><span class="line">&lt;&#x2F;template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line"></span><br><span class="line">    export default &#123;</span><br><span class="line">        name: &quot;Header&quot;,</span><br><span class="line">        data() &#123;</span><br><span class="line">            return &#123;</span><br><span class="line">                url_path: sessionStorage.url_path || &#39;&#x2F;&#39;,</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;,</span><br><span class="line">        methods: &#123;</span><br><span class="line">            goPage(url_path) &#123;</span><br><span class="line">                &#x2F;&#x2F; 已经是当前路由就没有必要重新跳转</span><br><span class="line">                if (this.url_path !&#x3D;&#x3D; url_path) &#123;</span><br><span class="line">                    this.$router.push(url_path);</span><br><span class="line">                &#125;</span><br><span class="line">                sessionStorage.url_path &#x3D; url_path;</span><br><span class="line">            &#125;,</span><br><span class="line">        &#125;,</span><br><span class="line">        created() &#123;</span><br><span class="line">            sessionStorage.url_path &#x3D; this.$route.path;</span><br><span class="line">            this.url_path &#x3D; this.$route.path;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style scoped&gt;</span><br><span class="line">    .header &#123;</span><br><span class="line">        background-color: white;</span><br><span class="line">        box-shadow: 0 0 5px 0 #aaa;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .header:after &#123;</span><br><span class="line">        content: &quot;&quot;;</span><br><span class="line">        display: block;</span><br><span class="line">        clear: both;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .slogan &#123;</span><br><span class="line">        background-color: #eee;</span><br><span class="line">        height: 40px;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .slogan p &#123;</span><br><span class="line">        width: 1200px;</span><br><span class="line">        margin: 0 auto;</span><br><span class="line">        color: #aaa;</span><br><span class="line">        font-size: 13px;</span><br><span class="line">        line-height: 40px;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .nav &#123;</span><br><span class="line">        background-color: white;</span><br><span class="line">        user-select: none;</span><br><span class="line">        width: 1200px;</span><br><span class="line">        margin: 0 auto;</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .nav ul &#123;</span><br><span class="line">        padding: 15px 0;</span><br><span class="line">        float: left;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .nav ul:after &#123;</span><br><span class="line">        clear: both;</span><br><span class="line">        content: &#39;&#39;;</span><br><span class="line">        display: block;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .nav ul li &#123;</span><br><span class="line">        float: left;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .logo &#123;</span><br><span class="line">        margin-right: 20px;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .ele &#123;</span><br><span class="line">        margin: 0 20px;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .ele span &#123;</span><br><span class="line">        display: block;</span><br><span class="line">        font: 15px&#x2F;36px &#39;微软雅黑&#39;;</span><br><span class="line">        border-bottom: 2px solid transparent;</span><br><span class="line">        cursor: pointer;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .ele span:hover &#123;</span><br><span class="line">        border-bottom-color: orange;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .ele span.active &#123;</span><br><span class="line">        color: orange;</span><br><span class="line">        border-bottom-color: orange;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .right-part &#123;</span><br><span class="line">        float: right;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .right-part .line &#123;</span><br><span class="line">        margin: 0 10px;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .right-part span &#123;</span><br><span class="line">        line-height: 68px;</span><br><span class="line">        cursor: pointer;</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;style&gt;</span><br></pre></td></tr></table></figure>



<h3 id="轮播图组件：components-Banner-vue"><a href="#轮播图组件：components-Banner-vue" class="headerlink" title="轮播图组件：components/Banner.vue"></a>轮播图组件：components/Banner.vue</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line">    &lt;div class&#x3D;&quot;banner&quot;&gt;</span><br><span class="line">        &lt;el-carousel height&#x3D;&quot;400px&quot;&gt;</span><br><span class="line">            &lt;el-carousel-item v-for&#x3D;&quot;item in 4&quot; :key&#x3D;&quot;item&quot;&gt;</span><br><span class="line">                &lt;img src&#x3D;&quot;..&#x2F;assets&#x2F;img&#x2F;banner1.png&quot; alt&#x3D;&quot;&quot;&gt;</span><br><span class="line">            &lt;&#x2F;el-carousel-item&gt;</span><br><span class="line">        &lt;&#x2F;el-carousel&gt;</span><br><span class="line">    &lt;&#x2F;div&gt;</span><br><span class="line">&lt;&#x2F;template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">    export default &#123;</span><br><span class="line">        name: &quot;Banner&quot;</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style scoped&gt;</span><br><span class="line">    .el-carousel__item &#123;</span><br><span class="line">        height: 400px;</span><br><span class="line">        min-width: 1200px;</span><br><span class="line">    &#125;</span><br><span class="line">    .el-carousel__item img &#123;</span><br><span class="line">        height: 400px;</span><br><span class="line">        margin-left: calc(50% - 1920px &#x2F; 2);</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;style&gt;</span><br></pre></td></tr></table></figure>



<h3 id="页脚组件：components-Footer-vue"><a href="#页脚组件：components-Footer-vue" class="headerlink" title="页脚组件：components/Footer.vue"></a>页脚组件：components/Footer.vue</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br></pre></td><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line">    &lt;div class&#x3D;&quot;footer&quot;&gt;</span><br><span class="line">        &lt;ul&gt;</span><br><span class="line">            &lt;li&gt;关于我们&lt;&#x2F;li&gt;</span><br><span class="line">            &lt;li&gt;联系我们&lt;&#x2F;li&gt;</span><br><span class="line">            &lt;li&gt;商务合作&lt;&#x2F;li&gt;</span><br><span class="line">            &lt;li&gt;帮助中心&lt;&#x2F;li&gt;</span><br><span class="line">            &lt;li&gt;意见反馈&lt;&#x2F;li&gt;</span><br><span class="line">            &lt;li&gt;新手指南&lt;&#x2F;li&gt;</span><br><span class="line">        &lt;&#x2F;ul&gt;</span><br><span class="line">        &lt;p&gt;Copyright © luffycity.com版权所有 | 京ICP备17072161号-1&lt;&#x2F;p&gt;</span><br><span class="line">    &lt;&#x2F;div&gt;</span><br><span class="line">&lt;&#x2F;template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">    export default &#123;</span><br><span class="line">        name: &quot;Footer&quot;</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;script&gt;</span><br><span class="line"></span><br><span class="line">&lt;style scoped&gt;</span><br><span class="line">    .footer &#123;</span><br><span class="line">        width: 100%;</span><br><span class="line">        height: 128px;</span><br><span class="line">        background: #25292e;</span><br><span class="line">        color: #fff;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .footer ul &#123;</span><br><span class="line">        margin: 0 auto 16px;</span><br><span class="line">        padding-top: 38px;</span><br><span class="line">        width: 810px;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .footer ul li &#123;</span><br><span class="line">        float: left;</span><br><span class="line">        width: 112px;</span><br><span class="line">        margin: 0 10px;</span><br><span class="line">        text-align: center;</span><br><span class="line">        font-size: 14px;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .footer ul::after &#123;</span><br><span class="line">        content: &quot;&quot;;</span><br><span class="line">        display: block;</span><br><span class="line">        clear: both;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    .footer p &#123;</span><br><span class="line">        text-align: center;</span><br><span class="line">        font-size: 12px;</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;style&gt;</span><br></pre></td></tr></table></figure>



<h3 id="主页组件：views-Home-vue"><a href="#主页组件：views-Home-vue" class="headerlink" title="主页组件：views/Home.vue"></a>主页组件：views/Home.vue</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line">    &lt;div class&#x3D;&quot;home&quot;&gt;</span><br><span class="line">        &lt;Header &#x2F;&gt;</span><br><span class="line">        &lt;Banner &#x2F;&gt;</span><br><span class="line">        &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</span><br><span class="line">        &lt;Footer &#x2F;&gt;</span><br><span class="line">    &lt;&#x2F;div&gt;</span><br><span class="line">&lt;&#x2F;template&gt;</span><br><span class="line"></span><br><span class="line">&lt;script&gt;</span><br><span class="line">    import Header from &#39;..&#x2F;components&#x2F;Header&#39;</span><br><span class="line">    import Footer from &#39;..&#x2F;components&#x2F;Footer&#39;</span><br><span class="line">    import Banner from &#39;..&#x2F;components&#x2F;Banner&#39;</span><br><span class="line"></span><br><span class="line">    export default &#123;</span><br><span class="line">        name: &quot;Home&quot;,</span><br><span class="line">        components: &#123;</span><br><span class="line">            Header,</span><br><span class="line">            Footer,</span><br><span class="line">            Banner,</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;script&gt;</span><br></pre></td></tr></table></figure>

</section>
    <!-- Tags START -->
    
    <!-- Tags END -->
    <!-- NAV START -->
    
  <div class="nav-container">
    <!-- reverse left and right to put prev and next in a more logic postition -->
    
      <a class="nav-left" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/14-%E6%B5%8F%E8%A7%88%E5%99%A8%E5%B1%8F%E5%B9%95%E7%BC%A9%E6%94%BEbug%E4%BF%AE%E5%A4%8D/">
        <span class="nav-arrow">← </span>
        
          python/路飞项目/1-项目基础/14-浏览器屏幕缩放bug修复
        
      </a>
    
    
      <a class="nav-right" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/2-git%E7%AC%94%E8%AE%B0/1-git/">
        
          python/路飞项目/2-git笔记/1-git
        
        <span class="nav-arrow"> →</span>
      </a>
    
  </div>

    <!-- NAV END -->
    <!-- 打赏 START -->
    
      <div class="money-like">
        <div class="reward-btn">
          赏
          <span class="money-code">
            <span class="alipay-code">
              <div class="code-image"></div>
              <b>使用支付宝打赏</b>
            </span>
            <span class="wechat-code">
              <div class="code-image"></div>
              <b>使用微信打赏</b>
            </span>
          </span>
        </div>
        <p class="notice">点击上方按钮,请我喝杯咖啡！</p>
      </div>
    
    <!-- 打赏 END -->
    <!-- 二维码 START -->
    
      <div class="qrcode">
        <canvas id="share-qrcode"></canvas>
        <p class="notice">扫描二维码，分享此文章</p>
      </div>
    
    <!-- 二维码 END -->
    
      <!-- Gitment START -->
      <div id="comments"></div>
      <!-- Gitment END -->
    
  </article>
  <!-- Article END -->
  <!-- Catalog START -->
  
    <aside class="catalog-container">
  <div class="toc-main">
  <!-- 不蒜子统计 -->
    <strong class="toc-title">目录</strong>
    
      <ol class="toc-nav"><li class="toc-nav-item toc-nav-level-2"><a class="toc-nav-link" href="#前端主页"><span class="toc-nav-text">前端主页</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#图片准备"><span class="toc-nav-text">图片准备</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#页头组件：components-Header-vue"><span class="toc-nav-text">页头组件：components&#x2F;Header.vue</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#轮播图组件：components-Banner-vue"><span class="toc-nav-text">轮播图组件：components&#x2F;Banner.vue</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#页脚组件：components-Footer-vue"><span class="toc-nav-text">页脚组件：components&#x2F;Footer.vue</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#主页组件：views-Home-vue"><span class="toc-nav-text">主页组件：views&#x2F;Home.vue</span></a></li></ol></li></ol>
    
  </div>
</aside>
  
  <!-- Catalog END -->
</main>

<script>
  (function () {
    var url = 'http://www.liuqingzheng.top/python/路飞项目/1-项目基础/9-luffy前台主页/';
    var banner = ''
    if (banner !== '' && banner !== 'undefined' && banner !== 'null') {
      $('#article-banner').css({
        'background-image': 'url(' + banner + ')'
      })
    } else {
      $('#article-banner').geopattern(url)
    }
    $('.header').removeClass('fixed-header')

    // error image
    $(".markdown-content img").on('error', function() {
      $(this).attr('src', 'http://file.muyutech.com/error-img.png')
      $(this).css({
        'cursor': 'default'
      })
    })

    // zoom image
    $(".markdown-content img").on('click', function() {
      var src = $(this).attr('src')
      if (src !== 'http://file.muyutech.com/error-img.png') {
        var imageW = $(this).width()
        var imageH = $(this).height()

        var zoom = ($(window).width() * 0.95 / imageW).toFixed(2)
        zoom = zoom < 1 ? 1 : zoom
        zoom = zoom > 2 ? 2 : zoom
        var transY = (($(window).height() - imageH) / 2).toFixed(2)

        $('body').append('<div class="image-view-wrap"><div class="image-view-inner"><img src="'+ src +'" /></div></div>')
        $('.image-view-wrap').addClass('wrap-active')
        $('.image-view-wrap img').css({
          'width': `${imageW}`,
          'transform': `translate3d(0, ${transY}px, 0) scale3d(${zoom}, ${zoom}, 1)`
        })
        $('html').css('overflow', 'hidden')

        $('.image-view-wrap').on('click', function() {
          $(this).remove()
          $('html').attr('style', '')
        })
      }
    })
  })();
</script>


  <script>
    var qr = new QRious({
      element: document.getElementById('share-qrcode'),
      value: document.location.href
    });
  </script>



  <script>
    var gitmentConfig = "liuqingzheng";
    if (gitmentConfig !== 'undefined') {
      var gitment = new Gitment({
        id: "python/路飞项目/1-项目基础/9-luffy前台主页",
        owner: "liuqingzheng",
        repo: "FuckBlog",
        oauth: {
          client_id: "32a4076431cf39d0ecea",
          client_secret: "94484bd79b3346a949acb2fda3c8a76ce16990c6"
        },
        theme: {
          render(state, instance) {
            const container = document.createElement('div')
            container.lang = "en-US"
            container.className = 'gitment-container gitment-root-container'
            container.appendChild(instance.renderHeader(state, instance))
            container.appendChild(instance.renderEditor(state, instance))
            container.appendChild(instance.renderComments(state, instance))
            container.appendChild(instance.renderFooter(state, instance))
            return container;
          }
        }
      })
      gitment.render(document.getElementById('comments'))
    }
  </script>




    <div class="scroll-top">
  <span class="arrow-icon"></span>
</div>
    <footer class="app-footer">
<!-- 不蒜子统计 -->
<span id="busuanzi_container_site_pv">
     本站总访问量<span id="busuanzi_value_site_pv"></span>次
</span>
<span class="post-meta-divider">|</span>
<span id="busuanzi_container_site_uv" style='display:none'>
     本站访客数<span id="busuanzi_value_site_uv"></span>人
</span>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>



  <p class="copyright">
    &copy; 2021 | Proudly powered by <a href="https://www.cnblogs.com/xiaoyuanqujing" target="_blank">小猿取经</a>
    <br>
    Theme by <a href="https://www.cnblogs.com/xiaoyuanqujing" target="_blank" rel="noopener">小猿取经</a>
  </p>
</footer>

<script>
  function async(u, c) {
    var d = document, t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
    s.parentNode.insertBefore(o, s);
  }
</script>
<script>
  async("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function(){
    FastClick.attach(document.body);
  })
</script>

<script>
  var hasLine = 'true';
  async("//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js", function(){
    $('figure pre').each(function(i, block) {
      var figure = $(this).parents('figure');
      if (hasLine === 'false') {
        figure.find('.gutter').hide();
      }
      var lang = figure.attr('class').split(' ')[1] || 'code';
      var codeHtml = $(this).html();
      var codeTag = document.createElement('code');
      codeTag.className = lang;
      codeTag.innerHTML = codeHtml;
      $(this).attr('class', '').empty().html(codeTag);
      figure.attr('data-lang', lang.toUpperCase());
      hljs.highlightBlock(block);
    });
  })
</script>





<!-- Baidu Tongji -->

<script>
    var _baId = 'c5fd96eee1193585be191f318c3fa725';
    // Originial
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?" + _baId;
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
</script>


<script src="/js/script.js"></script>


<script src="/js/search.js"></script>


<script src="/js/load.js"></script>



  <span class="local-search local-search-google local-search-plugin" style="right: 50px;top: 70px;;position:absolute;z-index:2;">
      <input type="search" placeholder="站内搜索" id="local-search-input" class="local-search-input-cls" style="">
      <div id="local-search-result" class="local-search-result-cls"></div>
  </span>


  </body>
</html>